import QtQuick 2.0
import QtQuick.Controls 2.12


Rectangle {
    id:m_rect
    color: "#808080"

    signal valueChange(var value);

    Slider {
        id: control
        anchors.fill: parent
        orientation: Qt.Vertical

        background: Rectangle {

            anchors.centerIn: parent
            width: 4
            height: 50
            radius: 2
            color: "#AAAAAA"
        }

        handle: Rectangle {
            id:m_test
            implicitWidth: 10
            implicitHeight: 10
            x: control.width / 2 - width / 2
            y: control.bottomPadding + control.availableHeight * control.visualPosition - width/2

            radius: 5
            color: control.pressed ? "#f0f0f0" : "#f6f6f6"
            border.color: "#FFFFFF"
        }

        value: 0.8

        onValueChanged: {
            valueChange(value);
        }
    }
}
